<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="../css/element.css" rel="stylesheet"/>
    <link href="../css/styleindex.css" rel="stylesheet"/>
    <style>

    </style>
</head>
<body style="background:#EFF0F4;">

  <div class="mui-content">
    <div id="vm" class="x-examok" v-cloak>
      <div class="x-header-g" id="header">
        <a class="x-header-arrow" @click="api.closeWin()"></a>
        <div class="x-header-t">成长轨迹</div>
      </div>
      <!-- 员工资料 -->
      <div class="x-pro-list">
        <div class="x-pro-pro">
          <div class="x-pro-left">
            <div class="x-pro-row">
              <div class="x-pro-label">姓名:</div>
              <div class="x-pro-input">
                {{input1}}
              </div>
            </div>
          </div>
          <div class="x-pro-right">
            <div class="x-pro-himg" :style="{'background-image':'url(' +input4+ ')','background-size':'cover','width':'4.5rem','height':'6rem','border-radius':'0.4rem','margin-bottom':'0.6rem'}" v-if="input4!=''"></div>
            <div class="x-pro-himg" v-else></div>
          </div>
        </div>
      </div>
      <!--  -->
      <div class="x-pro-list">
          <template>
            <el-table :data="persondata">
              <el-table-column label="序号" width="50" type="index" fixed></el-table-column>
              <!-- <el-table-column label="职级" width="70" fixed>
                <template slot-scope="scope">
                  {{scope.row.level_rank}}
                </template>
              </el-table-column> -->
              <el-table-column label="职位名称" width="">
                <template slot-scope="scope">
                  {{scope.row.job_title}}
                </template>
              </el-table-column>
              <el-table-column label="晋升时间" width="120">
                <template slot-scope="scope">
                  {{scope.row.date}}
                </template>
              </el-table-column>
              <el-table-column label="带训人" width="100">
                <template slot-scope="scope">
                  {{scope.row.take_member}}
                </template>
              </el-table-column>
              <el-table-column label="考核人" width="100">
                <template slot-scope="scope">
                  {{scope.row.exam_member}}
                </template>
              </el-table-column>
            </el-table>
          </template>

    </div>
  </div>

  <script type="text/javascript" src="../script/vue.js"></script>
  <script type="text/javascript" src="../script/element.js"></script>
  <script type="text/javascript" src="../script/api.js"></script>
  <script type="text/javascript" src="../script/base.js"></script>
	<script>
apiready = function () {
    var tid = api.pageParam.id;
    $api.fixStatusBar($api.byId('header'));


    //
    var vm = new Vue({
      el:'#vm',
      data(){
        return{
          input1:'',
          input4:'',
          tabledata:'',
          isfromindex:true,
          persondata:[],
          thid:'',


        }
      },
      created:function() {
        var that=this;


      },
      mounted:function(){
        var that=this;
        that.thid = tid;
        that.getpersondata()

      },
      methods: {
        //
        getpersondata:function(){
          let that=this;
          api.ajax({
            url:baseurl+'api/person/jobLog',
            methods:'get',
            data:{
              values:{
                sec: $api.getStorage('apptoken'),
                id:that.thid,
                _ssid:$api.getStorage('jobid')
              }
            }
          },function(ret,err){
            if(ret){
              api.hideProgress();
              console.log(JSON.stringify(ret));
              if(ret.status == 1){
                that.persondata = ret.data.view_data;
                that.input1 = ret.data.info.username;
                that.input4 = ret.data.info.avatar;

              }else{
                api.toast({
                    msg: ret.msg,
                    duration: 3000,
                    location: 'bottom'
                });
              }
            }else{
              api.hideProgress();
              console.log(JSON.stringify(err));
              api.toast({
                  msg: err.msg,
                  duration: 3000,
                  location: 'bottom'
              });
            }
          })
        },
      }
    })
	}


	</script>
</body>
</html>
